From: Bastien Nocera Date: Thu, 10 Apr 2014 19:08:49 +0000 (+0200) Subject: LookingGlass: Correct timeout usage X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2550 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=68b2d5fcf05b08bffccae386a76c2088a65a0377;p=gnome-shell.git LookingGlass: Correct timeout usage Calling Mainloop.source_remove() on the timeout ID will not reset it, and we're already removing the timeout by returning GLib.SOURCE_REMOVE in the callback. --- diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 2dccc9929..a39d713a7 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -843,7 +843,7 @@ const LookingGlass = new Lang.Class({ System.gc(); this._timeoutId = Mainloop.timeout_add(500, Lang.bind(this, function () { gcIcon.icon_name = 'gnome-fs-trash-full'; - Mainloop.source_remove(this._timeoutId); + this._timeoutId = 0; return GLib.SOURCE_REMOVE; })); GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] gcIcon.icon_name = \'gnome-fs-trash-full\'');